TOP

VBA Function: UCase

YouLibreCalc for Excel logo

Description

The VBA UCASE Function converts a character string to uppercase.


UCase Syntax

UCase(text)

VBA UCase Example

Converting a string to uppercase:

Sub UCaseExample()
    
     text = "Ref-45-X-876-rt"
    
     text = UCase(text)
    
     MsgBox text 'Returns: REF-45-X-876-RT
    
End Sub
The inverse function that converts to lowercase is the LCASE function.